exports.keys = 'lily123456'
// 添加 view 配置
exports.view = {
  defaultViewEngine: 'nunjucks',
  mapping: {
    '.tpl': 'nunjucks'
  }
}

exports.news = {
  pageSize: 5,
  serverUrl: 'https://hacker-news.firebaseio.com/v0'
}

exports.middleware = ['errorHandler', 'jwt', 'pagination']
// exports.middleware = ['errorHandler', 'pagination']

exports.pwd_salt = 'egg-api-salt'
// jsonwebtoken
exports.jwt = {
  secret: 'egg-api-jwt'
}

exports.security = {
  csrf: {
    enable: false
    // ignoreJSON: true // 默认为 false，当设置为 true 时，将会放过所有 content-type 为 `application/json` 的请求
  },
  domainWhiteList: ['http://127.0.0.1:8080']
}
exports.cors = {
  allowMethods: 'GET,HEAD,PUT,POST,DELETE,PATCH,OPTIONS'
}

exports.robot = {
  ua: [/Baiduspider/i]
}

exports.mongoose = {
  defaultDB: 'api',
  clients: {
    api: {
      url: 'mongodb://lily:123456@138.128.194.134:27017/api',
      options: {}
    }
  }
}

exports.wechat = {
  APPID: 'wx5146480326a6f5c0',
  SECRET: 'a21b66b2e4a4ffb11de66586f9ef35cf'
}

exports.qiniu = {
  ak: 'IK9SzIo0-NNQvEyLqWbdWWPZYCQDETsTwqGBd4n5',
  sk: 'QOmv3x__ka2LGt79Wkkpr1W7l-OhYSkkl1S-uosW',
  bucket: 'images',
  baseUrl: 'http://thinkleaf.cn/',
  zone: 'Zone_z0',
  app: true, // default value
  agent: false // default value
}
